﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Hartley.ApplicationLogic;
using Hartley.DTOs;

namespace WebApplication1
{
    public partial class viewAthleticCategorizewise : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindGridview();
            }
        }

        private void BindGridview()
        {
            string[] athleticLinkNames = { "View all of the College Athletic Data in Year wise",
                                             "View all of the College Athletic Data in Level wise",
                                             "View all of the College Athletic Data in Event wise",
                                             "View all of the College Athletic Data in  Age division wise" };
            string[] athleticLinkNavigationUrls = { "~/viewAthleticDataYrWise.aspx",
                                                  "~/viewAthleticDataLevelWise.aspx",
                                                  "~/viewAthleticDataEventWise.aspx",
                                                  "~/viewAthleticDataAgeDivisionWise.aspx"};
            DataTable dt = new DataTable();
            dt.Columns.Add("LinkName");
            dt.Columns.Add("NavigationUrl");
            for (int i = 0; i < athleticLinkNames.Count(); i++)
            {
                dt.Rows.Add();
                dt.Rows[i]["LinkName"] = athleticLinkNames[i].ToString();
            }

            for (int i = 0; i < athleticLinkNavigationUrls.Count(); i++)
            {
                dt.Rows.Add();
                dt.Rows[i]["NavigationUrl"] = athleticLinkNavigationUrls[i].ToString();
            }

            gvViewAthleticCategories.DataSource = dt;
            gvViewAthleticCategories.DataBind();
        }
    }
}